package com.cskaoyan.bean.vo;

import com.cskaoyan.bean.po.MarketTopic;
import org.springframework.beans.BeanUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Trellis
 * @since 2022/09/09 15:12
 */
public class WxTopicRelatedVo {

    /**
     * total : 1
     * pages : 1
     * limit : 4
     * page : 1
     * list : [{"picUrl":"http://182.92.235.201:8083/wx/storage/fetch/18zqq2wz1ktuwvs1yvo8.jpg","price":111,"subtitle":"11sdfg","id":359,"title":"11dfgh","readCount":"11"}]
     */
    private int total;
    private int pages;
    private int limit;
    private int page;
    private List<ListEntity> list = new ArrayList<>();

    public void copyList(MarketTopic marketTopic) {
        ListEntity listEntity = new ListEntity();
        BeanUtils.copyProperties(marketTopic,listEntity);
        list.add(listEntity);
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public void setPages(int pages) {
        this.pages = pages;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public void setList(List<ListEntity> list) {
        this.list = list;
    }

    public int getTotal() {
        return total;
    }

    public int getPages() {
        return pages;
    }

    public int getLimit() {
        return limit;
    }

    public int getPage() {
        return page;
    }

    public List<ListEntity> getList() {
        return list;
    }

    public class ListEntity {
        /**
         * picUrl : http://182.92.235.201:8083/wx/storage/fetch/18zqq2wz1ktuwvs1yvo8.jpg
         * price : 111.0
         * subtitle : 11sdfg
         * id : 359
         * title : 11dfgh
         * readCount : 11
         */
        private String picUrl;
        private double price;
        private String subtitle;
        private int id;
        private String title;
        private String readCount;

        public void setPicUrl(String picUrl) {
            this.picUrl = picUrl;
        }

        public void setPrice(double price) {
            this.price = price;
        }

        public void setSubtitle(String subtitle) {
            this.subtitle = subtitle;
        }

        public void setId(int id) {
            this.id = id;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public void setReadCount(String readCount) {
            this.readCount = readCount;
        }

        public String getPicUrl() {
            return picUrl;
        }

        public double getPrice() {
            return price;
        }

        public String getSubtitle() {
            return subtitle;
        }

        public int getId() {
            return id;
        }

        public String getTitle() {
            return title;
        }

        public String getReadCount() {
            return readCount;
        }
    }
}
